package com.qrsx.test;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.cache.annotation.Cacheable;
import org.springframework.stereotype.Service;

import com.qrsx.service.CityService;

@Service
public class EhCacheServiceImpl implements EhCacheService {

	@Autowired
	private CityService cs;
	
	@Override
	@Cacheable(cacheNames="daoCache", key="#key")
	public String oneCache(String key) {
		System.out.print("This is key:\t" );
		return ""+cs.getCountByClassName("Type");
	}

}
